package com.bfl.sa.common.mapper;

import com.bfl.sa.common.entity.AbstractEntity;
import com.bfl.sa.common.mybatis.entity.Query;

import java.io.Serializable;
import java.util.List;

public interface BaseMapper<E extends AbstractEntity, K extends Serializable> {

    int insert(E entity);

    int batchInsert(List<E> list);

    void update(E entity);

    void batchUpdate(List<E> list);

    E selectOne(K id);

    List<E> selectList(Query query);

    int count(Query query);

    int delete(K id);

    int batchDelete(K[] ids);
}
